#include <bits/stdc++.h>
using namespace std;
#define yes cout << "YES" << endl
#define no cout << "NO" << endl
using ll = long long;
void solve()
{
    int n;
    cin >> n;
    string s[3];
    cin >> s[0] >> s[1];
    int cnt = 0;
    for (int i = 0; i < n - 1; i++)
    {
        if (s[0][i] != s[0][i + 1])
            cnt++;
        if (s[1][i] != s[1][i + 1])
            cnt++;
    }
    cout << cnt + 1;
}
int main()
{
    int t = 1;
    // cin >> t;
    while (t--)
    {
        solve();
    }
    return 0;
}
